<div class="row row-eq-height">

  <div class="col-md-6">
    <div class="card card-primary">
      <div class="card-header">
        <span>Withdraw</span>
      </div>
      <div class="card-body">
        <%= description_for :withdraw do %>
          <%= item_for @withdraw, :id %>
          <%= item_for @withdraw, :created_at %>
          <%= item_for @withdraw, :aasm_state_text %>
          <hr class="split">
          <%= item_for @withdraw.member, :email do %>
            <%= @withdraw.member.email %>
          <% end %>
          <%= item_for @withdraw, 'Recipient ID' do %>
            <%= @withdraw.rid %>
          <% end %>
          <%= item_for @withdraw, :amount do %>
            <%= @withdraw.amount %>
          <% end %>
          <ul class="list-inline w-100 px-3 mt-3 pt-3 border-top">
            <% if @withdraw.may_accept? || @withdraw.may_process? || @withdraw.may_success? %>
              <li>
                <%= link_to 'Process', admin_withdraw_path(@withdraw.currency.code, @withdraw), class: 'btn btn-primary pull-left', method: 'PATCH' %>
              </li>
            <% end %>
            <% if @withdraw.may_reject? %>
              <li>
                <%= link_to 'Reject', admin_withdraw_path(@withdraw.currency.code, @withdraw), class: 'btn btn-danger pull-right', method: 'DELETE' %>
              </li>
            <% end %>
          </ul>
        <% end %>
      </div>
    </div>
  </div>

  <div class="col-md-6">
    <%= render partial: 'shared/admin/member', locals: {member: @withdraw.member} %>
    <%= render partial: 'shared/admin/account', locals: {account: @withdraw.account} %>
  </div>
</div>

